#define _CRT_SECURE_NO_WARNINGS 1
//#include <fstream>
//#include <iostream>
//#include <string>
//#include <sstream>
//#include<vector>
//#include<algorithm>
//using namespace std;

#include<stdio.h>
#include<string.h>
long long continuousSubarrays(int* nums, int numsSize) {
    int len = 1;
    long long ret = 0;
    while (len < numsSize)
    {
        if (len == 1)
        {
            ret = numsSize;
            len++;
        }
        else
        {
            for (int i = 0; i < len; i++)
            {
                if (nums[i] - nums[i + 1] <= 2 && nums[i] - nums[i + 1] >= 0)
                {
                    ret++;
                    len++;
                }
            }
        }
    }
    return ret;
}

int main()
{
    char arr[][20] = { "one.two","three.four.five","six" };
    char sp = '.';
    char** ret = NULL;
    for (char* tmp = strtok(arr[0], &sp); tmp != NULL; tmp = strtok(NULL, &sp))
        printf("%s\n", tmp);
      
    return 0;
}

int main1()
{
	int arr[] = { 5,4,2,4 };
    int len = sizeof(arr) / sizeof(arr[0]);
    printf("%lld\n", continuousSubarrays(arr, len));
	return 0;
}